# -*- coding: utf-8 -*-
# @Time : 2023/10/23 19:49
# @Author : ZH
# @File : 300.py
# @Software: PyCharm
from typing import List


class Solution:
    def lengthOfLIS(self, nums: List[int]) -> int:
        db = [1 for i in range(len(nums))]
        for i in range(len(nums)):
            for j in range(i):
                if nums[i] > nums[j]:
                    db[i] = max(db[i], db[j]+1)
        return max(db)


if __name__ == '__main__':
    so = Solution()
    details = [10, 9, 2, 5, 3, 7, 101, 18]
    {10: 2, 9: 2, 2: 5, 5: 3, 3: 3, 7: 2, 101: 0, 18: 0}
    l = so.lengthOfLIS(details)
    print(l)

